package com.qf.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/stu")
public class StuController {

    @RequestMapping("/query/{cid}")
    public String stuList(@PathVariable Integer cid){
        switch (cid) {
            case 1: return "小明2";
            case 2: return "小红2";
            case 3: return "小刚2";
        }
        return null;
    }
}
